package www.cskaoyan.com.bean;

import javax.print.attribute.standard.JobHoldUntil;
import java.util.HashMap;

/**
 * 学院Bean类
 */
public class Academy {

    private int id;
    private String academyName;

    public Academy(int id, String academyName){
        this.id = id;
        this.academyName = academyName;
    }

    public Academy(HashMap<String, String> parameters ){
        if (parameters == null){
            return;
        }else {
            try {
                // parameters={academyName=计算机}
                if (parameters.containsKey("id")){
                    id = Integer.parseInt((String) parameters.get("id"));
                }
                if (parameters.containsKey("academyName")){
                    academyName = (String) parameters.get("academyName");
                }
            }catch (Exception e){
                System.out.println("前端传递参数转化异常: 参考类型异常");
            }
        }
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getAcademyName() {
        return academyName;
    }

    public void setAcademyName(String academyName) {
        this.academyName = academyName;
    }


}
